package com.fenghongzhang.day005;

import android.content.Context;

import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.PagerSnapHelper;
import androidx.recyclerview.widget.RecyclerView;

public class MyLieanManager extends LinearLayoutManager {

    //讲review 一行转成一页来显示
    private PagerSnapHelper pagerSnapHelper;

    public MyLieanManager(Context context) {
        super(context);
    }

    //init
    @Override
    public void onAttachedToWindow(RecyclerView view) {
        super.onAttachedToWindow(view);
        pagerSnapHelper = new PagerSnapHelper();
        pagerSnapHelper.attachToRecyclerView(view);

    }
}
